package com.itheima.manager.heroManager;
//张飞类
public class ZhangFei extends Hero {
    final int addGj1=20;
    final int addGj2=30;
    final int addGj3=40;

    public ZhangFei(String name, int hp, int mp, int gj, int fy) {
        super(name, hp, mp, gj, fy);
    }

    public ZhangFei() {
    }


    @Override
    public void jiNeng1() {
        s.setSkillName("咆哮一击");
        s.setInduceMp(100);
        if (this.getMp() > s.getInduceMp()) {
            this.setMp(this.getMp() - s.getInduceMp());
            this.setGj(this.getGj()+addGj1);
            speak1();
        }
        else{
            System.out.println("蓝量不足，释放失败");
        }
    }

    @Override
    public void jiNeng2() {
        s.setSkillName("丈八蛇矛");
        s.setInduceMp(120);
        if (this.getMp() > s.getInduceMp()) {
            this.setMp(this.getMp() - s.getInduceMp());
            this.setGj(this.getGj()+addGj2);
            speak2();
        }
        else{
            System.out.println("蓝量不足，释放失败");
        }
    }

    @Override
    public void jiNeng3() {
        s.setSkillName("天神下凡");
        s.setInduceMp(150);
        if (this.getMp() > s.getInduceMp()) {
            this.setMp(this.getMp() - s.getInduceMp());
            this.setGj(this.getGj()+addGj3);
            speak3();
        }
        else{
            System.out.println("蓝量不足，释放失败");
        }
    }

    @Override
    public void speak1() {
        System.out.println(this.getName()+"释放了"+s.getSkillName()+"攻击力增加了"+addGj1);
    }

    @Override
    public void speak2() {
        System.out.println(this.getName()+"释放了"+s.getSkillName()+"攻击力增加了"+addGj2);
    }

    @Override
    public void speak3() {
        System.out.println(this.getName()+"释放了"+s.getSkillName()+"攻击力增加了"+addGj3);
    }
}
